<?php
/**
 *超级配配配接口
 */
require_once dirname(dirname(__DIR__))."/common.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\model\Activity;

try{

    //分页
    $page = isset($_REQUEST["page"]) ? intval($_REQUEST["page"]) : 1;
    $page = $page > 0 ? $page : 1;
    $pageSize =10;

    //实例化数据库
    $db = SysResource::getDB(false);
    $Activity = new Activity($db);

    $peipeipei=$Activity->one("type_sub",['sub_title'=>"超级配配配"]);
    $pei_id=$peipeipei['id'];
    $res=$Activity->peipeipei($page,$pageSize,$pei_id);
    if(empty($res['data'])){
        Response::output(0,"查询成功",[],0);
    }else{
        Response::output(0,"查询成功",$res['data'],$res['total']);
    }

}catch(DBException $e){
    Response::output(-1,"系统忙碌中");
}




